package com.itheima.tliassystem.mapper;


import entity.Dept;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface DepMapper {
    //查询部门表格
    @Select("select * from dept")
    List<Dept> selectAll();

    //更改部门表格信息
    @Insert("insert into dept (id, name, create_time, update_time) values (null,#{name},#{createTime},#{updateTime})")
    public void insert(Dept dept);

    //id 删除
    @Delete("delete from dept where id = #{id}")
    void deleteById(Integer id);

    @Update("update dept set name = #{name} where id = #{id} ")
    void upDate(Dept dept);

    @Select("select * from dept  where id = #{id}")
    Dept selectById(Integer id);
}
